<?php
declare(strict_types=1);

namespace Plugin\Alarm\Http\Request\Admin;

use Mine\MineFormRequest;

class RdAlarmWorkApplyRequest extends MineFormRequest
{
    /**
     * 公共规则
     */
    public function rules(): array
    {
        return [
            'work_id' => 'required|integer',
            'user_id' => 'required|integer',
            'status' => 'integer|in:0,1,2',
            'remark' => 'string|max:255',
            'handle_remark' => 'string|max:255',
        ];
    }

    /**
     * 字段映射名称
     * return array
     */
    public function attributes(): array
    {
        return [
            'id' => 'id',
            'work_id' => '工单ID',
            'user_id' => '接收用户ID',
            'status' => '状态',
            'remark' => '备注',
            'handle_remark' => '处理备注',
        ];
    }
}